<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>l8w8jwt: include/l8w8jwt/encode.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">l8w8jwt
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4cc40c4817b6dd8b994fc53e2126ebc6.html">l8w8jwt</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">encode.h</div></div>
</div><!--header-->
<div class="contents">
<a href="encode_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">   Copyright 2020 Raphael Beck</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"></span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">   Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">   you may not use this file except in compliance with the License.</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">   You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"></span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">       http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"></span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">   Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">   distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">   See the License for the specific language governing permissions and</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">   limitations under the License.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">*/</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#ifndef L8W8JWT_ENCODE_H</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#define L8W8JWT_ENCODE_H</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#include &quot;<a class="code" href="algs_8h.html">algs.h</a>&quot;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#include &quot;<a class="code" href="claim_8h.html">claim.h</a>&quot;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#include &quot;<a class="code" href="version_8h.html">version.h</a>&quot;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#include &quot;<a class="code" href="retcodes_8h.html">retcodes.h</a>&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#include &quot;timehelper.h&quot;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#include &lt;stddef.h&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#ifndef L8W8JWT_MAX_KEY_SIZE</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#define L8W8JWT_MAX_KEY_SIZE 8192</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">#endif </span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="foldopen" id="foldopen00044" data-start="{" data-end="};">
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html">   44</a></span>L8W8JWT_API <span class="keyword">struct </span><a class="code hl_struct" href="structl8w8jwt__encoding__params.html">l8w8jwt_encoding_params</a></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>{</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a5bf39d6b8874a581a6787b9784403c44">   50</a></span>    <span class="keywordtype">int</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a5bf39d6b8874a581a6787b9784403c44">alg</a>;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#ac3e119df4134e8401a7a5f6cba382eb8">   56</a></span>    <span class="keywordtype">char</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#ac3e119df4134e8401a7a5f6cba382eb8">iss</a>;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#abe0c785b58909faafaf04afba2c5ab11">   61</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#abe0c785b58909faafaf04afba2c5ab11">iss_length</a>;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a376070b013b0157e49c9286e889fdf1a">   67</a></span>    <span class="keywordtype">char</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a376070b013b0157e49c9286e889fdf1a">sub</a>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#aac80100445af4476fd8a641d91e99cd9">   72</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#aac80100445af4476fd8a641d91e99cd9">sub_length</a>;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a7eddc5806fc35c5ec24a59e4442afdad">   79</a></span>    <span class="keywordtype">char</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a7eddc5806fc35c5ec24a59e4442afdad">aud</a>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a283a81f8fce1307597b53c8bbcfe4f05">   84</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a283a81f8fce1307597b53c8bbcfe4f05">aud_length</a>;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#ae1bf5088f5cdc36cc7d1e2fc95e73c24">   90</a></span>    <span class="keywordtype">char</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#ae1bf5088f5cdc36cc7d1e2fc95e73c24">jti</a>;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a0338f8a3e6b0a267dfcae8e2081811ab">   95</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a0338f8a3e6b0a267dfcae8e2081811ab">jti_length</a>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a122c70e016eee5f9939891ace9f757b2">  103</a></span>    l8w8jwt_time_t <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a122c70e016eee5f9939891ace9f757b2">exp</a>;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#abfb468a6d0d4a213913d861538b6472a">  111</a></span>    l8w8jwt_time_t <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#abfb468a6d0d4a213913d861538b6472a">nbf</a>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#ae4a59d6619927a691f77a781cb191188">  119</a></span>    l8w8jwt_time_t <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#ae4a59d6619927a691f77a781cb191188">iat</a>;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a88974eca176b4327ee4eb28ba12c4176">  126</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="structl8w8jwt__claim.html">l8w8jwt_claim</a>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a88974eca176b4327ee4eb28ba12c4176">additional_header_claims</a>;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a7d82af3d398472eef5de3b4534927995">  131</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a7d82af3d398472eef5de3b4534927995">additional_header_claims_count</a>;</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#ada84ad38961414ec25101cd22fba5240">  138</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="structl8w8jwt__claim.html">l8w8jwt_claim</a>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#ada84ad38961414ec25101cd22fba5240">additional_payload_claims</a>;</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a15fdfb0592f3d175bfec2786362a015b">  143</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a15fdfb0592f3d175bfec2786362a015b">additional_payload_claims_count</a>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a34152cd49b4ea1bd906672b8167556d8">  149</a></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a34152cd49b4ea1bd906672b8167556d8">secret_key</a>;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a76e20b9285d52accb63ac5fc1dc924f7">  154</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a76e20b9285d52accb63ac5fc1dc924f7">secret_key_length</a>;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span> </div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#aa64eeff0b890d1fa37e7c65e8e78429c">  161</a></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#aa64eeff0b890d1fa37e7c65e8e78429c">secret_key_pw</a>;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a6505bb6a25569abb23edac378892dbdb">  166</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a6505bb6a25569abb23edac378892dbdb">secret_key_pw_length</a>;</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#aff53956be385bd146899b80c44ae9484">  172</a></span>    <span class="keywordtype">char</span>** <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#aff53956be385bd146899b80c44ae9484">out</a>;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span> </div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="structl8w8jwt__encoding__params.html#a06c545ea2dd26dbcd3a8a7182c85b745">  177</a></span>    <span class="keywordtype">size_t</span>* <a class="code hl_variable" href="structl8w8jwt__encoding__params.html#a06c545ea2dd26dbcd3a8a7182c85b745">out_length</a>;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>};</div>
</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="encode_8h.html#a9fb32622347f1de69947a311c9af8621">  184</a></span>L8W8JWT_API <span class="keywordtype">void</span> <a class="code hl_function" href="encode_8h.html#a9fb32622347f1de69947a311c9af8621">l8w8jwt_encoding_params_init</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structl8w8jwt__encoding__params.html">l8w8jwt_encoding_params</a>* params);</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="encode_8h.html#a489f0316311f70eaee999ea265838d65">  191</a></span>L8W8JWT_API <span class="keywordtype">int</span> <a class="code hl_function" href="encode_8h.html#a489f0316311f70eaee999ea265838d65">l8w8jwt_validate_encoding_params</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structl8w8jwt__encoding__params.html">l8w8jwt_encoding_params</a>* params);</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="encode_8h.html#ac51d9592ef1a73a1db46147fc96bc584">  200</a></span>L8W8JWT_API <span class="keywordtype">int</span> <a class="code hl_function" href="encode_8h.html#ac51d9592ef1a73a1db46147fc96bc584">l8w8jwt_encode</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structl8w8jwt__encoding__params.html">l8w8jwt_encoding_params</a>* params);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>} <span class="comment">// extern &quot;C&quot;</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span><span class="preprocessor">#endif </span><span class="comment">// L8W8JWT_ENCODE_H</span></div>
<div class="ttc" id="aalgs_8h_html"><div class="ttname"><a href="algs_8h.html">algs.h</a></div><div class="ttdoc">JWT algorithms as defined in https://tools.ietf.org/html/rfc7518#section-3.1.</div></div>
<div class="ttc" id="aclaim_8h_html"><div class="ttname"><a href="claim_8h.html">claim.h</a></div><div class="ttdoc">JWT claims as described in https://auth0.com/docs/tokens/concepts/jwt-claims.</div></div>
<div class="ttc" id="aencode_8h_html_a489f0316311f70eaee999ea265838d65"><div class="ttname"><a href="encode_8h.html#a489f0316311f70eaee999ea265838d65">l8w8jwt_validate_encoding_params</a></div><div class="ttdeci">L8W8JWT_API int l8w8jwt_validate_encoding_params(struct l8w8jwt_encoding_params *params)</div></div>
<div class="ttc" id="aencode_8h_html_a9fb32622347f1de69947a311c9af8621"><div class="ttname"><a href="encode_8h.html#a9fb32622347f1de69947a311c9af8621">l8w8jwt_encoding_params_init</a></div><div class="ttdeci">L8W8JWT_API void l8w8jwt_encoding_params_init(struct l8w8jwt_encoding_params *params)</div></div>
<div class="ttc" id="aencode_8h_html_ac51d9592ef1a73a1db46147fc96bc584"><div class="ttname"><a href="encode_8h.html#ac51d9592ef1a73a1db46147fc96bc584">l8w8jwt_encode</a></div><div class="ttdeci">L8W8JWT_API int l8w8jwt_encode(struct l8w8jwt_encoding_params *params)</div></div>
<div class="ttc" id="aretcodes_8h_html"><div class="ttname"><a href="retcodes_8h.html">retcodes.h</a></div><div class="ttdoc">Macros for possible integer codes returned by the various l8w8jwt functions.</div></div>
<div class="ttc" id="astructl8w8jwt__claim_html"><div class="ttname"><a href="structl8w8jwt__claim.html">l8w8jwt_claim</a></div><div class="ttdef"><b>Definition</b> claim.h:83</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html"><div class="ttname"><a href="structl8w8jwt__encoding__params.html">l8w8jwt_encoding_params</a></div><div class="ttdef"><b>Definition</b> encode.h:45</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a0338f8a3e6b0a267dfcae8e2081811ab"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a0338f8a3e6b0a267dfcae8e2081811ab">l8w8jwt_encoding_params::jti_length</a></div><div class="ttdeci">size_t jti_length</div><div class="ttdef"><b>Definition</b> encode.h:95</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a06c545ea2dd26dbcd3a8a7182c85b745"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a06c545ea2dd26dbcd3a8a7182c85b745">l8w8jwt_encoding_params::out_length</a></div><div class="ttdeci">size_t * out_length</div><div class="ttdef"><b>Definition</b> encode.h:177</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a122c70e016eee5f9939891ace9f757b2"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a122c70e016eee5f9939891ace9f757b2">l8w8jwt_encoding_params::exp</a></div><div class="ttdeci">l8w8jwt_time_t exp</div><div class="ttdef"><b>Definition</b> encode.h:103</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a15fdfb0592f3d175bfec2786362a015b"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a15fdfb0592f3d175bfec2786362a015b">l8w8jwt_encoding_params::additional_payload_claims_count</a></div><div class="ttdeci">size_t additional_payload_claims_count</div><div class="ttdef"><b>Definition</b> encode.h:143</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a283a81f8fce1307597b53c8bbcfe4f05"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a283a81f8fce1307597b53c8bbcfe4f05">l8w8jwt_encoding_params::aud_length</a></div><div class="ttdeci">size_t aud_length</div><div class="ttdef"><b>Definition</b> encode.h:84</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a34152cd49b4ea1bd906672b8167556d8"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a34152cd49b4ea1bd906672b8167556d8">l8w8jwt_encoding_params::secret_key</a></div><div class="ttdeci">unsigned char * secret_key</div><div class="ttdef"><b>Definition</b> encode.h:149</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a376070b013b0157e49c9286e889fdf1a"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a376070b013b0157e49c9286e889fdf1a">l8w8jwt_encoding_params::sub</a></div><div class="ttdeci">char * sub</div><div class="ttdef"><b>Definition</b> encode.h:67</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a5bf39d6b8874a581a6787b9784403c44"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a5bf39d6b8874a581a6787b9784403c44">l8w8jwt_encoding_params::alg</a></div><div class="ttdeci">int alg</div><div class="ttdef"><b>Definition</b> encode.h:50</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a6505bb6a25569abb23edac378892dbdb"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a6505bb6a25569abb23edac378892dbdb">l8w8jwt_encoding_params::secret_key_pw_length</a></div><div class="ttdeci">size_t secret_key_pw_length</div><div class="ttdef"><b>Definition</b> encode.h:166</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a76e20b9285d52accb63ac5fc1dc924f7"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a76e20b9285d52accb63ac5fc1dc924f7">l8w8jwt_encoding_params::secret_key_length</a></div><div class="ttdeci">size_t secret_key_length</div><div class="ttdef"><b>Definition</b> encode.h:154</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a7d82af3d398472eef5de3b4534927995"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a7d82af3d398472eef5de3b4534927995">l8w8jwt_encoding_params::additional_header_claims_count</a></div><div class="ttdeci">size_t additional_header_claims_count</div><div class="ttdef"><b>Definition</b> encode.h:131</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a7eddc5806fc35c5ec24a59e4442afdad"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a7eddc5806fc35c5ec24a59e4442afdad">l8w8jwt_encoding_params::aud</a></div><div class="ttdeci">char * aud</div><div class="ttdef"><b>Definition</b> encode.h:79</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_a88974eca176b4327ee4eb28ba12c4176"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#a88974eca176b4327ee4eb28ba12c4176">l8w8jwt_encoding_params::additional_header_claims</a></div><div class="ttdeci">struct l8w8jwt_claim * additional_header_claims</div><div class="ttdef"><b>Definition</b> encode.h:126</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_aa64eeff0b890d1fa37e7c65e8e78429c"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#aa64eeff0b890d1fa37e7c65e8e78429c">l8w8jwt_encoding_params::secret_key_pw</a></div><div class="ttdeci">unsigned char * secret_key_pw</div><div class="ttdef"><b>Definition</b> encode.h:161</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_aac80100445af4476fd8a641d91e99cd9"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#aac80100445af4476fd8a641d91e99cd9">l8w8jwt_encoding_params::sub_length</a></div><div class="ttdeci">size_t sub_length</div><div class="ttdef"><b>Definition</b> encode.h:72</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_abe0c785b58909faafaf04afba2c5ab11"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#abe0c785b58909faafaf04afba2c5ab11">l8w8jwt_encoding_params::iss_length</a></div><div class="ttdeci">size_t iss_length</div><div class="ttdef"><b>Definition</b> encode.h:61</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_abfb468a6d0d4a213913d861538b6472a"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#abfb468a6d0d4a213913d861538b6472a">l8w8jwt_encoding_params::nbf</a></div><div class="ttdeci">l8w8jwt_time_t nbf</div><div class="ttdef"><b>Definition</b> encode.h:111</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_ac3e119df4134e8401a7a5f6cba382eb8"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#ac3e119df4134e8401a7a5f6cba382eb8">l8w8jwt_encoding_params::iss</a></div><div class="ttdeci">char * iss</div><div class="ttdef"><b>Definition</b> encode.h:56</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_ada84ad38961414ec25101cd22fba5240"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#ada84ad38961414ec25101cd22fba5240">l8w8jwt_encoding_params::additional_payload_claims</a></div><div class="ttdeci">struct l8w8jwt_claim * additional_payload_claims</div><div class="ttdef"><b>Definition</b> encode.h:138</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_ae1bf5088f5cdc36cc7d1e2fc95e73c24"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#ae1bf5088f5cdc36cc7d1e2fc95e73c24">l8w8jwt_encoding_params::jti</a></div><div class="ttdeci">char * jti</div><div class="ttdef"><b>Definition</b> encode.h:90</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_ae4a59d6619927a691f77a781cb191188"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#ae4a59d6619927a691f77a781cb191188">l8w8jwt_encoding_params::iat</a></div><div class="ttdeci">l8w8jwt_time_t iat</div><div class="ttdef"><b>Definition</b> encode.h:119</div></div>
<div class="ttc" id="astructl8w8jwt__encoding__params_html_aff53956be385bd146899b80c44ae9484"><div class="ttname"><a href="structl8w8jwt__encoding__params.html#aff53956be385bd146899b80c44ae9484">l8w8jwt_encoding_params::out</a></div><div class="ttdeci">char ** out</div><div class="ttdef"><b>Definition</b> encode.h:172</div></div>
<div class="ttc" id="aversion_8h_html"><div class="ttname"><a href="version_8h.html">version.h</a></div><div class="ttdoc">l8w8jwt version checking.</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>
